package org.zn.note.java8.Bean;

import com.google.common.collect.ImmutableList;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Apple {
    private Integer weight = 0;
    private String color = "";

    public static List<Apple> genApples() {
        return Arrays.asList(
                Apple.builder().color("red").weight(100).build(),
                Apple.builder().color("red").weight(150).build(),
                Apple.builder().color("green").weight(100).build(),
                Apple.builder().color("green").weight(150).build());
    }
}
